<html>
<head>
	<link type="text/css" rel="stylesheet" href="../css/default.css" />
    <link type="text/css" rel="stylesheet" href="../js/rainbow/themes/sunburst.css">
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
</head>
<body>
	<div class="page">
<h2>IgePoly2d <span>CLASS</span></h2>
<p>Declared in <a href="../../engine/core/IgePoly2d.js">IgePoly2d.js</a></p>
<div class="itemBox">
	<div class="header">Description</div>
	<div class="content">Creates a new 2d polygon made up of IgePoint instances.</div>
</div>
<!--=if{extends}[-->
<div class="itemBox">
	<div class="header">Extends</div>
	<div class="content"><a href="IgeClass.html">IgeClass</a></div>
</div>
<!--=if{extends}]-->
<h2>Methods</h2><a name="multiply"></a>
<h3 class="methodTitle">multiply</h3>
<div class="methodSection">
    <!--=if{desc}[-->
    <div class="methodDesc">Multiplies the points of the polygon by the supplied factor.</div>
    <!--=if{desc}]-->
    <div class="methodDefinition"><span class="methodName">multiply</span>({<span class="argType">Number</span>} <span class="argName">factor</span>)</div>
    <div class="methodArgs"><ul class="argList"><li>{<span class="argType">Number</span>}<span class="argName">factor</span> The multiplication factor.</li></ul></div>
    <div class="methodReturnDesc">Returns {<span class="argType">*</span>} </div>
    
</div><a name="divide"></a>
<h3 class="methodTitle">divide</h3>
<div class="methodSection">
    <!--=if{desc}[-->
    <div class="methodDesc">Divides the points of the polygon by the supplied value.</div>
    <!--=if{desc}]-->
    <div class="methodDefinition"><span class="methodName">divide</span>({<span class="argType">Number</span>} <span class="argName">value</span>)</div>
    <div class="methodArgs"><ul class="argList"><li>{<span class="argType">Number</span>}<span class="argName">value</span> The divide value.</li></ul></div>
    <div class="methodReturnDesc">Returns {<span class="argType">*</span>} </div>
    
</div><a name="addPoint"></a>
<h3 class="methodTitle">addPoint</h3>
<div class="methodSection">
    <!--=if{desc}[-->
    <div class="methodDesc">Adds a point to the polygon relative to the polygon center at 0, 0.</div>
    <!--=if{desc}]-->
    <div class="methodDefinition"><span class="methodName">addPoint</span>({<span class="argType"></span>} <span class="argName">x</span>, {<span class="argType"></span>} <span class="argName">y</span>)</div>
    <div class="methodArgs"><ul class="argList"><li>{<span class="argType"></span>}<span class="argName">x</span> </li><li>{<span class="argType"></span>}<span class="argName">y</span> </li></ul></div>
    <div class="methodReturnDesc"></div>
    
</div><a name="length"></a>
<h3 class="methodTitle">length</h3>
<div class="methodSection">
    <!--=if{desc}[-->
    <div class="methodDesc">Returns the length of the poly array.</div>
    <!--=if{desc}]-->
    <div class="methodDefinition"><span class="methodName">length</span>()</div>
    <div class="methodArgs"></div>
    <div class="methodReturnDesc">Returns {<span class="argType">Number</span>} </div>
    
</div><a name="pointInPoly"></a>
<h3 class="methodTitle">pointInPoly</h3>
<div class="methodSection">
    <!--=if{desc}[-->
    <div class="methodDesc">Check if a point is inside this polygon.</div>
    <!--=if{desc}]-->
    <div class="methodDefinition"><span class="methodName">pointInPoly</span>({<span class="argType"><a href="./IgePoint.html">IgePoint</a></span>} <span class="argName">point</span>)</div>
    <div class="methodArgs"><ul class="argList"><li>{<span class="argType"><a href="./IgePoint.html">IgePoint</a></span>}<span class="argName">point</span> </li></ul></div>
    <div class="methodReturnDesc">Returns {<span class="argType">Boolean</span>} </div>
    
</div><a name="xyInside"></a>
<h3 class="methodTitle">xyInside</h3>
<div class="methodSection">
    <!--=if{desc}[-->
    <div class="methodDesc">Check if the passed x and y are inside this polygon.</div>
    <!--=if{desc}]-->
    <div class="methodDefinition"><span class="methodName">xyInside</span>({<span class="argType">Number</span>} <span class="argName">x</span>, {<span class="argType">Number</span>} <span class="argName">y</span>)</div>
    <div class="methodArgs"><ul class="argList"><li>{<span class="argType">Number</span>}<span class="argName">x</span> </li><li>{<span class="argType">Number</span>}<span class="argName">y</span> </li></ul></div>
    <div class="methodReturnDesc">Returns {<span class="argType">Boolean</span>} </div>
    
</div><a name="clone"></a>
<h3 class="methodTitle">clone</h3>
<div class="methodSection">
    <!--=if{desc}[-->
    <div class="methodDesc">Returns a copy of this IgePoly2d object that is it's own version, separate from the original.</div>
    <!--=if{desc}]-->
    <div class="methodDefinition"><span class="methodName">clone</span>()</div>
    <div class="methodArgs"></div>
    <div class="methodReturnDesc">Returns {<span class="argType">IgePoly2d</span>} </div>
    
</div><a name="clockWiseTriangle"></a>
<h3 class="methodTitle">clockWiseTriangle</h3>
<div class="methodSection">
    <!--=if{desc}[-->
    <div class="methodDesc">Determines if the polygon is clockwise or not.</div>
    <!--=if{desc}]-->
    <div class="methodDefinition"><span class="methodName">clockWiseTriangle</span>()</div>
    <div class="methodArgs"></div>
    <div class="methodReturnDesc">Returns {<span class="argType">Boolean</span>} A boolean true if clockwise or false if not.</div>
    
</div><a name="render"></a>
<h3 class="methodTitle">render</h3>
<div class="methodSection">
    <!--=if{desc}[-->
    <div class="methodDesc">Draws the polygon bounding lines to the passed context.</div>
    <!--=if{desc}]-->
    <div class="methodDefinition"><span class="methodName">render</span>({<span class="argType">CanvasRenderingContext2D</span>} <span class="argName">ctx</span>)</div>
    <div class="methodArgs"><ul class="argList"><li>{<span class="argType">CanvasRenderingContext2D</span>}<span class="argName">ctx</span> </li></ul></div>
    <div class="methodReturnDesc"></div>
    
</div>	</div>
    <script type="text/javascript">
        $(function () {
            $('code').attr('data-language', 'javascript');
        });
    </script>
    <script type="text/javascript" src="../js/rainbow/rainbow-custom.min.js"></script>
</body>
</html>